package com.czw.ddm.activity

import android.os.Bundle
import com.alibaba.ha.adapter.AliHaAdapter
import com.czw.ddm.databinding.ActivityMainDdmBinding
import com.mtzqc.common.databinding.CommonTitleBarBinding
import com.mtzqc.common.init.StartHelper
import com.mtzqc.common.kt.loadCircle
import com.mtzqc.common.kt.onClick
import com.mtzqc.common.ui.activity.TitleBarBindingActivity
import com.taobao.accs.AccsClientConfig
import com.taobao.update.datasource.UpdateDataSource

class MainActivity :
    TitleBarBindingActivity<ActivityMainDdmBinding>(ActivityMainDdmBinding::inflate) {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding.img.loadCircle(
            "https://dss2.bdstatic.com/8_V1bjqh_Q23odCf/pacific/1993451942.jpg",
            10f
        )
        binding.img.onClick {
            // showLoading("dddd")
           // throw NullPointerException(" custom null error")
            AccsClientConfig
            //  throw RuntimeException("tesd custom error")
            //TLogService.logv("MODEL_app","logv","MESSAGE__logv");
            // TLogService.logd("MODEL_app","logd","MESSAGE__logd");
            // TLogService.logi("MODEL_app","logi","MESSAGE__logi");
            // TLogService.logw("MODEL_app","logw","MESSAGE__logw");
            //  TLogService.loge("MODEL_app","loge","MESSAGE__loge");
            //SophixManager.getInstance().queryAndLoadNewPatch()
            UpdateDataSource.getInstance().startManualUpdate(false)
        }
        binding.abcx.onClick {
           // TLogService.positiveUploadTlog("MODEL_app_COMMENT");
           StartHelper.agreeServices()
        }

    }

    override fun loadSirTarget(): Any {
        return binding.qq
    }

    override fun onRetryBtnClick() {
        // super.onRetryBtnClick()
        showPageSuccess()
    }

    override fun initTitleBarLeft(bar: CommonTitleBarBinding) {
        //  super.initTitleBarLeft(bar)
    }

    override fun titleTxt(): CharSequence? {
        return "dada"
    }


}